package cn.iocoder.yudao.module.bpm.feign;

import cn.iocoder.yudao.module.bpm.api.task.dto.ApiBpmProcessInstanceCreateReqKeyVO;
import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqVO;
import com.xueyi.common.core.constant.basic.ServiceConstants;
import com.xueyi.common.core.pojo.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;

/**
 * 流程实例 Api 接口
 *
 * @author 芋道源码
 */
@FeignClient(contextId = "bpmWfFlowApi", value = ServiceConstants.WORKFLOW_SERVICE)
public interface BpmWfFlowApi {

    /**
     * @description     开始流程实例
     * @author          zhengchao
     * @date            Created in 2022/5/24
     */
    @PostMapping("/newInstance")
    CommonResult<Object> createProcessInstance(@RequestBody @Valid ApiBpmProcessInstanceCreateReqKeyVO reqVO);

}
